package com.shangqing.system.droughtinformation.service.impl;

import com.shangqing.system.droughtinformation.entity.DroughtWarning;
import com.shangqing.system.droughtinformation.mapper.DroughtWarningMapper;
import com.shangqing.system.droughtinformation.service.IdroughtWarningService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DroughtWarningImpl implements IdroughtWarningService {
    @Autowired
    private DroughtWarningMapper droughtWarningMapper;

    @Override
    public List<DroughtWarning> getAll() {
        return (List<DroughtWarning>) droughtWarningMapper.getAll();
    }

    @Override
    public List<DroughtWarning> getAll(int id) {
        return (List<DroughtWarning>) droughtWarningMapper.getAllById(id);
    }
}
